﻿using AgateLib.Sprites;
using AiAsteriods.Game.Entities.Base;
using AiAsteriods.Game.Entities.Effects;
using AiAsteriods.Game.State;

namespace AgateLibTest.Game.Entities.Effects {
  class CircleExplosion : EntityAbstract {
    private Emitter emitter1;
    public CircleExplosion(int x, int y, int dx, int dy, GameStateAbstract state) :
      base(null, x, y, 0, 0, 30, 1, 0, state) {
      Sprite tempSprite = myState.RM.GetSprite("circleSprite");
      tempSprite.SetScale(2.0, 2.0);
      tempSprite.Alpha = 90;
      emitter1 = new Emitter(tempSprite, (int)this.X, (int)this.Y, 0, 40, 0, 0, 3, 0.15, 0.01, 180, 360, 30, 600, 300, 255, 200, 100, myState);
    }
    public override void Update(int delta) {
      emitter1.Update(delta);

      if (emitter1.done) {
        myState.RemoveEntity(this);
      }
    }
    public override void Draw() {
      emitter1.Draw();
    }
    public override void Collide(EntityAbstract e) { }

    public override bool CollisionTest(EntityAbstract e) {
      return false;
    }
  }
}
